# 同一天命令，在不同的对象，产生的效果是不同的

class Dog(object):

    def __init__(self, name):
        self.name = name


    def game(self):
        print("%s 蹦蹦跳跳的玩耍..." % self.name)





class XiaoTianQuan(Dog):


    def game(self):
        print("%s 飞到天上去..." % self.name)


class Person:
    def __init__(self, name):
        self.name = name


    def get_with_dog(self, dog:Dog):
        print("%s 和 %s 快乐的玩耍..." % (self.name, dog.name))
        dog.game()

if __name__ == '__main__':
    zhangshan = Person("张三")
    wangcai = Dog("旺财")
    zhangshan.get_with_dog(wangcai)
    xiaotianquan = XiaoTianQuan('哮天犬')
    zhangshan.get_with_dog(xiaotianquan)